Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: memstats new stat should reuse measurement #516

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

lvrach
Copy link
Member

@lvrach lvrach commented Jun 4, 2024

Description

Found this issue while writing tests for a histogram metric. I did expect to receive 20 measurements for a metric, but instead I got only one.

It turns out that since a new stat was created every time, the measurement was getting overridden.

Note that this might have a breaking behaviour downstream, but tests that use .GetAll or .GetByName should have and test all measurements captured.

Linear Ticket

https://linear.app/rudderstack/issue/PIPE-1161/fix-memstats-bug

resolves PIPE-1161

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@lvrach lvrach changed the title fix: memstats new stat should reuse existing measurement fix: memstats new stat should reuse measurement Jun 4, 2024
@lvrach lvrach marked this pull request as ready for review June 4, 2024 17:51
@lvrach lvrach enabled auto-merge (squash) June 4, 2024 17:51
Copy link
Contributor

@mihir20 mihir20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvrach lvrach merged commit ab7c8f6 into main Jun 5, 2024
16 of 18 checks passed
@lvrach lvrach deleted the fix.memstats branch June 5, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants